package de.mmis.core.base.gui;

import javax.swing.JPanel;

import de.mmis.core.base.Position;

/**
 * Component displaying visual representation of a specific device. Please note that it is presumed for all GUI components to have an parameterless, empty constructor. All initialization work can be done in the initialize method.
 * @author Christian Koch
 *
 * @param <D> type of device represented
 */
public interface DeviceRepresentationComponent<D> extends GUIComponent<D>
{
	/**
	 * @param clazz type of object
	 * @return true, if this component is applicable to an object of given type, otherwise false
	 */
	public boolean isApplicableForRepresenting(Class<?> clazz);

	public JPanel getRepresentationPanel();
	
	/**
	 * @return dimension of representation component in room coordinates. If null is returned, the component will be drawn with fixed pixel width and height (these values are set by the component itself by calling setSize method)
	 */
	public abstract Position getRepresentationDimension();
}
